<?xml version="1.0" encoding="utf-8"?>

<!--  ==  A contnet type to hold the settings for Social Networking integration for Eonicweb.
          Ideally in future to move this into a config file, editable via an admin page xForm 
-->

<Content type="xform" name="EditContent">
	<model>
		<instance>
			<tblContent>
				<nContentKey/>
				<nContentPrimaryId/>
				<nVersion/>
				<cContentForiegnRef/>
				<cContentName/>
				<cContentSchemaName>SocialNetworkingSettings</cContentSchemaName>
				<cContentXmlBrief>
          <Content>
            <Bookmarks>
              <Methods google="true" facebook="true" twitter="true" linkedin="true" stumbleupon="" delicious=""/>
              <MenuItem count="true" appearance="inline" size="standard" position="module"/>
              <Content count="true" appearance="inline" size="standard" position="top"/>   
            </Bookmarks>
            <Following>
              <Method name="Facebook" username="" url="" />
              <Method name="Twitter" username="" url="" />
              <Method name="Google+" username="" url="" />
              <Method name="LinkedIn" username="" url="" />
              <Method name="Pinterest" url="" />
              <Method name="FeedBurner" url="" />
            </Following>
          </Content>
				</cContentXmlBrief>
				<cContentXmlDetail/>
				<nAuditId/>
				<nAuditKey/>
				<dPublishDate/>
				<dExpireDate/>
				<dInsertDate/>
				<nInsertDirId/>
				<dUpdateDate/>
				<nUpdateDirId/>
				<nStatus>1</nStatus>
				<cDescription/>
        <bCascade>true</bCascade>
			</tblContent>
		</instance>
		<submission id="EditContent" action="" method="post" event="return form_check(this)"/>
		<bind id="cContentName" nodeset="tblContent/cContentName" required="true()" type="string"/>
    <bind nodeset="tblContent/cContentXmlBrief/Content">
      <!-- bookmarks -->
      <bind nodeset="Bookmarks">
        <bind nodeset="Methods">
          <bind id="cFacebook" nodeset="@facebook" required="false()" type="string"/>
          <bind id="cFacebookShare" nodeset="@facebookShare" required="false()" type="string"/>
          <bind id="cGoogle" nodeset="@google" required="false()" type="string"/>
          <bind id="cTwitter" nodeset="@twitter" required="false()" type="string"/>
          <bind id="cLinkedin" nodeset="@linkedin" required="false()" type="string"/>
          <bind id="cPinterest" nodeset="@pinterest" required="false()" type="string"/>
        </bind>
        <bind nodeset="Content">
          <bind id="bcSizes" nodeset="@size" required="false()" type="string"/>
          <bind id="bcPosition" nodeset="@position" required="false()" type="string"/>
          <bind id="bcCount" nodeset="@count" required="false()" type="string"/>
        </bind>
        <bind nodeset="MenuItem">
          <bind id="bpSizes" nodeset="@size" required="false()" type="string"/>
          <bind id="bpPosition" nodeset="@position" required="false()" type="string"/>
          <bind id="bpCount" nodeset="@count" required="false()" type="string"/>
        </bind>
        
      </bind>
    </bind>
		<bind id="dPublishDate" nodeset="tblContent/dPublishDate" required="false()" type="string"/>
		<bind id="dExpireDate" nodeset="tblContent/dExpireDate" required="false()" type="string"/>
		<bind id="nStatus" nodeset="tblContent/nStatus" required="true()" type="string"/>
		<bind id="bCascade" nodeset="tblContent/bCascade" required="false()" type="string"/>
		<!--bind id="cContentRecRead" nodeset="tblContent/cContentXmlDetail/Content/group/div[@class='recRead']" required="false()" type="string"/-->
	</model>
	<group ref="EditContent" class="2col">
		<label>Global social networking settings</label>
		<group>
      <group>
			  <input bind="nContentKey" class="hidden">
				  <label>ContentId</label>
			  </input>
			  <label>Settings</label>
			  <input bind="cContentName" class="required short">
				  <label>Name</label>
			  </input>
			  <input bind="dPublishDate" class="calendar short">
				  <label>Publish date</label>
			  </input>
			  <input bind="dExpireDate" class="calendar short">
				  <label>Expire date</label>
			  </input>
			  <select1 bind="nStatus" appearance="full" class="required vshort">
				  <label>Status</label>
				  <item>
					  <label>Live</label>
					  <value>1</value>
				  </item>
				  <item>
					  <label>Hidden</label>
					  <value>0</value>
				  </item>
			  </select1>
			  <select bind="bCascade" appearance="full">
				  <label>Cascade to child pages</label>
				  <item>
					  <label></label>
					  <value>true</value>
				  </item>
			  </select>
			 
      </group>
		</group>
    <group>
      <group class="inline">
        <label>Bookmarking methods allowed</label>
        <!--<label>
            <p>Social bookmarking allows users to bookmark your content or pages to a social networking website, often allowing them to share with their assiociates</p>
          </label>-->
          <!--<group class="inline">
            <label>Bookmarking methods</label>-->
            <select bind="cFacebook" appearance="minimal" class="checkboxes">
              <item>
                <label>Facebook 'Like'</label>
                <value>true</value>
              </item>
            </select>
            <select bind="cFacebookShare" appearance="minimal" class="checkboxes">
              <item>
                <label>Facebook 'Share'</label>
                <value>true</value>
              </item>
            </select>
            <select bind="cGoogle" appearance="minimal" class="checkboxes">
              <item>
                <label>Google '+1'</label>
                <value>true</value>
              </item>
            </select>
            <select bind="cTwitter" appearance="minimal" class="checkboxes">
              <item>
                <label>Twitter 'Tweet'</label>
                <value>true</value>
              </item>
            </select>
            <select bind="cLinkedin" appearance="minimal" class="checkboxes">
              <item>
                <label>Linkedin 'Share'</label>
                <value>true</value>
              </item>
            </select>
            <select bind="cPinterest" appearance="minimal" class="checkboxes">
              <item>
                <label>Pinterest 'Pin It'</label>
                <value>true</value>
              </item>
            </select>
          <!--</group>-->
		  </group>

      <group class="inline">
        <label>Content bookmarking settings</label>
        <select1 bind="bcSizes" appearance="full">
          
          <label>Size</label>
          <item>
            <label>Standard</label>
            <value>standard</value>
            <toggle case="bcCount_1" event="DOMActivate"/>
          </item>
          <item>
            <label>Large</label>
            <value>large</value>
            <toggle case="bcCount_2" event="DOMActivate"/>
          </item>
          <help class="inline">
             <h5>Standard</h5>            
            <img src="/ewcommon/images/admin/help/socialnetworking/icons-standard.png"/>
            <br/>
            <br/>
              <h5>Large</h5>
              <img src="/ewcommon/images/admin/help/socialnetworking/icons-large.png"/>
          </help>
        </select1>
        <switch class="disable">
          <case id="bcCount_1">
            <select1 bind="bcCount" appearance="full">
              <label>Include count</label>
              <item>
                <label>Yes</label>
                <value>true</value>
              </item>
              <item>
                <label>No</label>
                <value>false</value>
              </item>
              <help class="inline">
                <p>Includes a count of how many people have bookmarked this item</p>
                <img src="/ewcommon/images/admin/help/socialnetworking/icons-count.png"/>
              </help>
            </select1>
          </case>
          <case id="bcCount_2"/>
        </switch>
        <select1 bind="bcPosition" appearance="full">
          <label>Page position</label>
          <item>
            <label>Top left</label>
            <value>top-left</value>
          </item>
          <item>
            <label>Top right</label>
            <value>top-right</value>
          </item>
          <item>
            <label>Bottom left</label>
            <value>bottom-left</value>
          </item>
          <item>
            <label>Bottom right</label>
            <value>bottom-right</value>
          </item>
        </select1>
        
      </group>

      <group class="inline">
        <label>Page bookmarking settings</label>
        <select1 bind="bpSizes" appearance="full">

          <label>Size</label>
          <item>
            <label>Standard</label>
            <value>standard</value>
            <toggle case="bpCount_1" event="DOMActivate"/>
          </item>
          <item>
            <label>Large</label>
            <value>large</value>
            <toggle case="bpCount_2" event="DOMActivate"/>
          </item>
          <help class="inline">
            <h5>Standard</h5>
            <img src="/ewcommon/images/admin/help/socialnetworking/icons-standard.png"/>
            <br/>
            <br/>
            <h5>Large</h5>
            <img src="/ewcommon/images/admin/help/socialnetworking/icons-large.png"/>
          </help>
        </select1>
        <switch class="disable">
          <case id="bpCount_1">
            <select1 bind="bpCount" appearance="full">
              <label>Include count</label>
              <item>
                <label>Yes</label>
                <value>true</value>
              </item>
              <item>
                <label>No</label>
                <value>false</value>
              </item>
              <help class="inline">
                <p>Includes a count of how many people have bookmarked this item</p>
                <img src="/ewcommon/images/admin/help/socialnetworking/icons-count.png"/>
              </help>
            </select1>
          </case>
          <case id="bpCount_2"/>
        </switch>
        <select1 bind="bpPosition" appearance="full">
          <label>Page position</label>
          <item>
            <label>I'll use a module when I want it</label>
            <value>module</value>
          </item>
          <item>
            <label>Top left</label>
            <value>top-left</value>
          </item>
          <item>
            <label>Top right</label>
            <value>top-right</value>
          </item>
          <item>
            <label>Bottom left</label>
            <value>bottom-left</value>
          </item>
          <item>
            <label>Bottom right</label>
            <value>bottom-right</value>
          </item>
        </select1>

      </group>

      <group>
        
      </group>
      
    </group>
	</group>
	<group ref="submit" class="contentSubmit">
		<submit submission="" ref="ewSubmit" class="principle">
			<label>Save settings</label>
		</submit>
	</group>
</Content>
